<template>
  <!-- 搜索区 -->
  <div class="box">
    受捐企业：
    <base-select id="selSearchOrg" :lists="orgList" @selected="getOption">
      <template v-slot="option">
        {{ option.item.name }}
      </template>
    </base-select>
    <input
      type="button"
      id="btnSearch"
      value="查询"
      @click="handleClickSearch"
    />
    <base-page-box :total-page="totalPage" :current-page="currentPage"
      >{{ currentPage }}/{{ totalPage }}</base-page-box
    >
  </div>
</template>

<script>
import BasePageBox from "@/components/BasePageBox";
export default {
  components: {
    BasePageBox,
  },
  props: {
    orgList: {
      type: Array,
      required: true,
    },
    currentPage: {
      type: Number,
    },
    totalPage: {
      type: Number,
    },
  },
  data() {
    return {
      selectOption: "",
    };
  },
  methods: {
    handleClickSearch() {

      //trigger search event
      this.$emit("change-data-filter", this.selectOption);
    },
  },
};
</script>

<style>
</style>